package com.woniu.Service;

import com.github.pagehelper.PageInfo;
import com.woniu.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @Author:Gwj
 * @Date:2024/7/3 19:20
 */
public interface RoleService {
    //获取所有的角色信息
    List<Role> getAllRoleInfo(Integer isDelete) throws Exception;

    //查询角色信息 分页查询
    PageInfo<Role> findRoleInfoByPage(int pageNum, int pageSize) throws Exception;

    // 删除角色 逻辑删除
    int changeRoleIsDeleted(Role role) throws Exception;

    //新增角色
    int addRole(Role role) throws Exception;

    //修改角色
    int updateRoleInfoById(Role role) throws Exception;

    //角色新增 重名验证
    Role checkRoleName(String roleName) throws Exception;

    //角色修改 重名验证
    Role selectRoleByNameAndId(@Param("roleName") String roleName, @Param("roleId") Integer roleId) throws Exception;

    // 角色信息 模糊查询
    PageInfo<Role> selectRoleInfoByRoleName(String roleName, int pageNum, int pageSize) throws Exception;
}
